package com.xuecheng.content.service;

import com.xuecheng.content.model.dto.CoursePreviewDto;
import com.xuecheng.content.model.po.CoursePublish;

import java.io.File;

/**
 * @description: 课程预览、发布相关接口
 * @author: ajie
 * @date: 2024/1/25 15:30:58
 * @version: 1.0
 */
public interface CoursePublishService {

    /**
     * @description: 获取课程预览信息
     * @params: [courseId]
     * @return:
     * @author: ajie
     * @date: 2024/1/25 15:33
     */
    public CoursePreviewDto getCoursePreviewInfo(Long courseId);

    /**
     * @description: 提交审核 
     * @params: [companyId, courseId]       
     * @return: 
     * @author: ajie
     * @date: 2024/1/25 21:03
     */
    public void commitAudit(Long companyId,Long courseId);

    /**
     * @description: 课程发布 
     * @params: [companyId, courseId]       
     * @return: 
     * @author: ajie
     * @date: 2024/1/26 22:39
     */
    public void publish(Long companyId,Long courseId);

    /**
     * @description: 课程静态化
     * @params: [courseId]
     * @return:
     * @author: ajie
     * @date: 2024/1/27 15:41
     */
    public File generateCourseHtml(Long courseId);

    /**
     * @description: 上传课程静态化页面
     * @params: [courseId, file]
     * @return:
     * @author: ajie
     * @date: 2024/1/27 15:41
     */
    public void  uploadCourseHtml(Long courseId, File file);

    /**
     * @description: 根据课程id查询课程发布消息 
     * @params: [courseId]       
     * @return: 
     * @author: ajie
     * @date: 2024/2/1 20:53
     */
    CoursePublish getCoursePublish(Long courseId);
    
    /**
     * @description: 课程发布查询优化 
     * @params: [courseId]       
     * @return: 
     * @author: ajie
     * @date: 2024/2/8 21:43
     */
    CoursePublish getCoursePublishCache(Long courseId);
}
